package com.wz.project.api.tmsMatnr.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wz.project.api.tmsMatnr.mapper.TmMatnrMapper;
import com.wz.project.api.tmsMatnr.domain.TmMatnr;
import com.wz.project.api.tmsMatnr.service.ITmMatnrService;
import com.wz.common.utils.text.Convert;

/**
 * tms物品信息Service业务层处理
 * 
 * @author wz
 * @date 2022-11-28
 */
@Service
public class TmMatnrServiceImpl implements ITmMatnrService 
{
    @Autowired
    private TmMatnrMapper tmMatnrMapper;

    /**
     * 查询tms物品信息
     * 
     * @param matnr tms物品信息ID
     * @return tms物品信息
     */
    @Override
    public TmMatnr selectTmMatnrById(String matnr)
    {
        return tmMatnrMapper.selectTmMatnrById(matnr);
    }
    @Override
    public List<TmMatnr> selectTmMatnrByFbarcode(String fbarcode)
    {
        return tmMatnrMapper.selectTmMatnrByFbarcode(fbarcode);
    }
    @Override
    public List<TmMatnr> selectTmMatnrBybarcode(String barcode)
    {
        return tmMatnrMapper.selectTmMatnrBybarcodes(barcode);
    }
    @Override
    public List<TmMatnr> selectTmMatnrByStickInIde(String fbarcode)
    {
        return tmMatnrMapper.selectTmMatnrByStickInIde(fbarcode);
    }
    @Override
    public int selectTmMatnrGroupProduct(String fbarcode)
    {
        return tmMatnrMapper.selectTmMatnrGroupProduct(fbarcode);
    }
    @Override
    public List<TmMatnr> selectTmMatnrByInstock(String stockInId)
    {
        return tmMatnrMapper.seleteTmMatnrByStickInId(stockInId);
    }
    /**
     * 查询tms物品信息列表
     * 
     * @param tmMatnr tms物品信息
     * @return tms物品信息
     */
    @Override
    public List<TmMatnr> selectTmMatnrList(TmMatnr tmMatnr)
    {
        return tmMatnrMapper.selectTmMatnrList(tmMatnr);
    }

    /**
     * 新增tms物品信息
     * 
     * @param tmMatnr tms物品信息
     * @return 结果
     */
    @Override
    public int insertTmMatnr(TmMatnr tmMatnr)
    {
        return tmMatnrMapper.insertTmMatnr(tmMatnr);
    }

    /**
     * 修改tms物品信息
     * 
     * @param tmMatnr tms物品信息
     * @return 结果
     */
    @Override
    public int updateTmMatnr(TmMatnr tmMatnr)
    {
        return tmMatnrMapper.updateTmMatnr(tmMatnr);
    }

    /**
     * 删除tms物品信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTmMatnrByIds(String ids)
    {
        return tmMatnrMapper.deleteTmMatnrByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除tms物品信息信息
     * 
     * @param barcode tms物品信息ID
     * @return 结果
     */
    @Override
    public int deleteTmMatnrById(String barcode)
    {
        return tmMatnrMapper.deleteTmMatnrById(barcode);
    }
}
